package com.harbintransport.backend.model;

import java.io.Serializable;
import java.util.Objects;

public class DispatchSuggestionId implements Serializable {

    private String routeId;
    private String stationId;
    private int hour;

    // Default constructor
    public DispatchSuggestionId() {
    }

    // Parameterized constructor
    public DispatchSuggestionId(String routeId, String stationId, int hour) {
        this.routeId = routeId;
        this.stationId = stationId;
        this.hour = hour;
    }

    // Getters and Setters
    public String getRouteId() {
        return routeId;
    }

    public void setRouteId(String routeId) {
        this.routeId = routeId;
    }

    public String getStationId() {
        return stationId;
    }

    public void setStationId(String stationId) {
        this.stationId = stationId;
    }

    public int getHour() {
        return hour;
    }

    public void setHour(int hour) {
        this.hour = hour;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        DispatchSuggestionId that = (DispatchSuggestionId) o;
        return hour == that.hour &&
                Objects.equals(routeId, that.routeId) &&
                Objects.equals(stationId, that.stationId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(routeId, stationId, hour);
    }
}